﻿using System;
using System.Linq;

namespace IssueIT.Core.Domain.Model
{
	public class NewPostCommand
	{
		public NewPostCommand(Post latestPost)
		{
			throw new NotImplementedException();
		}

		//factory??
		public NewPostCommand GetCommand(Issue fromIssue)
		{
            //hmmmmmmmm hvad gør vi her - skal den baseres på en evt. usynlig?
            //var basePost = new Post() { Status = fromIssue.LatestStatus ?? Status.Default }; 
            //TODO: løs denne
            Post basePost = new Post();
			NewPostCommand command = new NewPostCommand(basePost);

			return command;
		}

		public User PostedBy { get; set; }

		public string Title { get; set; }

		public string Text { get; set; }

		public Company VisibleTo { get; set; }

		public Post PreviousPost { get; set; }
	}
}